package edu.hcmus.sow.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import edu.hcmus.sow.dao.ProjectDAO;
import edu.hcmus.sow.domain.Project;

@Service
public class ProjectService {
   @Autowired
   private ProjectDAO projectDAO;

   public List<Project> getAuthorizedProjects(Integer clientID) {
      return projectDAO.getByClientID(clientID);
   }

   public List<Project> findAll() {
      List<Project> list = projectDAO.findAll();
      return list;
   }

   public Project getProjectByID(Integer id) {
      return projectDAO.findById(id);
   }
}